log using "MH_Judicial_Influence.log"

*** Load dataset
use "MH_Judicial_Influence_data.dta", clear

*** Overall probability of ciation is 0.0007
tab nonneg_cite

*** Main model 
probit nonneg_cite numSame sameAgeCohort cosine100 sameSubIssue id_opposed_prec  citing_chief citing_fresh_au ln_citing_word_count  citing_year cited_dissent cited_prec_age ln_cited_word_count,  robust cluster(citing_caseID)
estimates store mod1

*** Figure 1
margins, at(numSame=(0 1 2 3) ) post
marginsplot, xdimension(numSame) recast(scatter) plot1opts(bcolor(gs10) lcolor(black) ) ci1opt(color(black) lwidth(medium)) yscale(range(0.0005 .0009)) ytick(0.0005(.00005).0009) ylab(0.0005(.0001).0009)  ytitle(Predicted Probability of Citation) xtitle("Number of Shared Identities") title("Probability of Citation", color(black)) legend(off) xsize(3) ysize(2.25) plotregion(margin(l+5 r+5)) graphregion(lcolor(black) lwidth(medthick) margin(r+5 b+3))

** Moving from 0 to 3 shared identities results in a relative increase of 25%
estimates restore mod1
margins, at(numSame=(0 3)) 
di .0007755/.0006196


*** Online Appendix A

* 9% of citations are negative
tab lexCite
count if lexNeg == 1 & lexPos == 0
di 374/4109

** Table 1 Summary of precedent-authoring judges
tab citedRace if citedFemale == 0 & citedGOP == 1
tab citedRace if citedFemale == 1 & citedGOP == 1
tab citedRace if citedFemale == 0 & citedGOP == 0
tab citedRace if citedFemale == 1 & citedGOP == 0

* Panel median matches case outcome 49% of the times
count if (cited_pan_med < 0 & cited_liberal_outcome ==1) | (cited_pan_med > 0 & cited_conservative_outcome ==1)
di 2573562/_N

** Table 2: Summary Statistics
eststo sumstats: estpost summarize numSame  cosine100 ln_citing_word_count   citing_year  cited_prec_age ln_cited_word_count , d
estout sumstats, cells("min(fmt(2)) p25(fmt(2)) p50(fmt(2)) p75(fmt(2)) max(fmt(2))") 
tab nonneg_cite
tab sameGenderB
tab sameRaceB
tab sameParty
tab sameAgeCohort
tab sameSubIssue
tab id_opposed_prec 
tab citing_chief
tab citing_fresh_au
tab cited_dissent

** Table 3: Citation Model Regression Results
estout mod1, cells("b(star fmt(3)) se(fmt(3) par)")  starlevels(* 0.05)  stats( N aic bic)  label 


*** Online Appendix B

** Table 4: Binary Specification of Shared Identities
probit nonneg_cite  i.ingroupBuck  sameAgeCohort cosine100 sameSubIssue id_opposed_prec citingPanAu citing_chief citing_fresh_au ln_citing_word_count  citing_year cited_dissent cited_prec_age ln_cited_word_count,  robust cluster(citing_caseID) 
estimates store mod2
probit nonneg_cite  c.sameGenderB c.sameRaceB c.sameParty sameAgeCohort cosine100 sameSubIssue id_opposed_prec citingPanAu citing_chief citing_fresh_au ln_citing_word_count  citing_year cited_dissent cited_prec_age ln_cited_word_count,  robust cluster(citing_caseID)  
estimates store mod3
estout mod2 mod3, cells("b(star fmt(3)) se(fmt(3) par)")  starlevels(* 0.05)  stats( N aic bic) label 

** Pairwise comparison from model with interacted binary shared identity variables
estimates restore mod2
pwcompare ingroupBuck
* Difference between 3 shared identities and shared gender and race, p = 0.037
di 2*(1 - normal(.0369387/.0176781))
* Difference between 3 shared identities and shared party, p = 0.039
di 2*(1 - normal(.0778889/.0377903))
* Difference between 3 shared identities and shared gender, p < 0.0001
di 2*(1 - normal(.0878712/.0264344))
* Difference between shared party and race and only same gender, p = 0.006
di 2*(1 - normal( .085674/.030902 ))


*** Online Appendix C

** Table 5: Models without cosine similarity
probit nonneg_cite numSame sameAgeCohort sameSubIssue id_opposed_prec  citing_chief citing_fresh_au ln_citing_word_count  citing_year cited_dissent cited_prec_age ln_cited_word_count,  robust cluster(citing_caseID)
estimates store mod1c
probit nonneg_cite  i.ingroupBuck  sameAgeCohort  sameSubIssue id_opposed_prec citing_chief citing_fresh_au ln_citing_word_count  citing_year cited_dissent cited_prec_age ln_cited_word_count,  robust cluster(citing_caseID)  
estimates store mod2c
probit nonneg_cite  c.sameGenderB c.sameRaceB c.sameParty sameAgeCohort  sameSubIssue id_opposed_prec citing_chief citing_fresh_au ln_citing_word_count  citing_year cited_dissent cited_prec_age ln_cited_word_count,  robust cluster(citing_caseID)  
estimates store mod3c
estout mod1c mod2c mod3c, cells("b(star fmt(3)) se(fmt(3) par)")  starlevels(* 0.05)  stats( N aic bic)  

** Table 6: Models with only top half of cosine data
sum cosine100, d
probit nonneg_cite numSame sameAgeCohort sameSubIssue id_opposed_prec  citing_chief citing_fresh_au ln_citing_word_count  citing_year cited_dissent cited_prec_age ln_cited_word_count if cosine100 > 5.44,  robust cluster(citing_caseID)
estimates store mod1e
probit nonneg_cite  i.ingroupBuck  sameAgeCohort  sameSubIssue id_opposed_prec citing_chief citing_fresh_au ln_citing_word_count  citing_year cited_dissent cited_prec_age ln_cited_word_count if cosine100 > 5.44,  robust cluster(citing_caseID)  
estimates store mod2e
probit nonneg_cite  c.sameGenderB c.sameRaceB c.sameParty sameAgeCohort  sameSubIssue id_opposed_prec citing_chief citing_fresh_au ln_citing_word_count  citing_year cited_dissent cited_prec_age ln_cited_word_count if cosine100 > 5.44,  robust cluster(citing_caseID)  
estimates store mod3e
estout mod1e mod2e mod3e, cells("b(star fmt(3)) se(fmt(3) par)")  starlevels(* 0.05)  stats( N aic bic) label

*** Table 7: Main model with shared professional experiences
probit nonneg_cite numSame sameAgeCohort cosine100 sameSubIssue id_opposed_prec citingPanAu citing_chief citing_fresh_au ln_citing_word_count  citing_year cited_dissent cited_prec_age ln_cited_word_count  bothPros sameLawSchool bothAG bothSG bothTeach,  robust cluster(citing_caseID)
estimates store mod1d
estout mod1d , cells("b(star fmt(3)) se(fmt(3) par)")  starlevels(* 0.05)  stats( N aic bic)   label


*** Analysis of aggregated impact

** Average potential cites per prec: 1,028
keep cited_caseID
gen counter = 1
egen potCitePerPrec = sum(counter), by (cited_caseID)
duplicates drop
sum potCitePerPrec,d

* Average precedent cited 0.82 times if 3 shared identities
di (1028 * .0008)
* Average precedent cited 0.62 times if 0 shared identities
di (1028 * .0006)
* Estimated cites with 3 shared identities for 1000 precedents: 822
di (1028 * .0008) * 1000
* Estimated cites with 0 shared identities for 1000 precedents: 617
di (1028 * .0006) * 1000
** Difference between 3 and 0 shared identities: 205
di 822 - 617


log close

